<?php

if(@$_GET['do']=="x"){
if(!isset($zxsblog_user[$_POST['usr']])){
$msg = "用户不存在！";
}else{
if(sha1($_POST['psw'])!=$zxsblog_user[$_POST['usr']]){
$msg = "密码错误！";
}else{
$cookietime=time()+3600*24*365;
setcookie(md5('islogin'), "1", $cookietime,"/");
header('Location:admin.php');
die();
}
}
}
if(@$_GET['out']=="1"){
$msg = "成功退出~感谢使用~";
}
?>
<!DOCTYPE html>
<html>
<head>
	<title>请输入密码</title>
	<style type="text/css">
      body {
        padding-top: 40px;
        padding-bottom: 40px;
        background-color: #f5f5f5;
		font-family:Microsoft Yahei !important;
      }

      .form-signin {
        max-width: 300px;
        padding: 19px 29px 29px;
        margin: 0 auto 20px;
        background-color: #fff;
        border: 1px solid #e5e5e5;
        -webkit-border-radius: 5px;
           -moz-border-radius: 5px;
                border-radius: 5px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                box-shadow: 0 1px 2px rgba(0,0,0,.05);
      }
      .form-signin .form-signin-heading,
      .form-signin .checkbox {
        margin-bottom: 10px;
      }
      .form-signin input[type="text"],
      .form-signin input[type="password"] {
        font-size: 16px;
        height: auto;
        margin: 0 0;
        padding: 7px 9px;
      }

    </style>
	<link href="/bootstrap.css" rel="stylesheet">
    <!--[if lt IE 9]>
      <script src="//cdnjs.bootcss.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
    <![endif]-->
</head>
<div class="container">
      <form class="form-signin" method="post" action="?do=x">
	  <h2 class="form-signin-heading" style="text-align:center">@后台管理</h2>
	  <div style="margin: 0;" class="<?php if(!empty($msg)){echo 'alert alert-error';}else{echo "alert alert-info";}?>">
  系统酱提醒您：<?php if(!empty($msg)){echo $msg;}else{echo "请登录再操作~";}?>
</div>
        <input type="text" class="input-block-level" placeholder="用户名" name="usr" style="font-family:Microsoft Yahei;border-radius: 0px;">
        <input type="password" class="input-block-level" placeholder="密码" name="psw" style="font-family:Microsoft Yahei;border-radius: 0px;">
        <button class="btn btn-large btn-primary disabled" type="submit" style="cursor: pointer;border-radius: 0px;font-family:Microsoft Yahei;font-size:30px;width:100%;">戳我登录</button>
      </form>

    </div>
	 <script src="//cdnjs.bootcss.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="/bootstrap.js"></script>
</html>